<?php
/* @var $this GoodsInController */
/* @var $model GoodsIn */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'goods-in-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'goodsid'); ?>
		<?php echo $form->textField($model,'goodsid',array('readonly'=>true)); ?>
		<?php echo $form->error($model,'goodsid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'count'); ?>
		<?php echo $form->textField($model,'count',array('readonly'=>true)); ?>
		<?php echo $form->error($model,'count'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'totalprice'); ?>
		<?php echo $form->textField($model,'totalprice',array('readonly'=>true)); ?>
		<?php echo $form->error($model,'totalprice'); ?>
	</div>


	<div class="row">
		<?php echo $form->labelEx($model,'operator'); ?>
		<?php echo $form->textField($model,'operator',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'operator'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'date'); ?>
		<?php 
		$this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'attribute'=>'date',
				'model'=>$model,
				// additional javascript options for the date picker plugin
				'options'=>array(
						'showAnim'=>'fold',
						'dateFormat'=>'yy-mm-dd',
						'dayNames'=>array("日","一","二","三","四","五","六"),
						'dayNamesMin'=>array("日","一","二","三","四","五","六"),
						'monthNames'=>array("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"),
						'maxDate'=>'0'
				),
				'htmlOptions'=>array(
						'style'=>'height:20px;'
				),
		));
		?>
		<?php echo $form->error($model,'date'); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '入库' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->